// SseRepository.kt
package org.goldfish.demo.multifrontend.messageboard.mobile.background

import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.SharedFlow

object SseRepository {
    private val _events = MutableSharedFlow<String>(
        replay = 0,
        extraBufferCapacity = 64
    )
    val events: SharedFlow<String> = _events

    internal fun emit(data: String) {
        _events.tryEmit(data)
    }
}
